3.107 \(\int \frac{a+b x^2}{1+x^2} \, dx\)

Optimal. Leaf size=12 \[ (a-b) \tan ^{-1}(x)+b x \]

[Out]

b*x + (a - b)*ArcTan[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0226548, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133 \[ (a-b) \tan ^{-1}(x)+b x \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x^2)/(1 + x^2),x]

[Out]

b*x + (a - b)*ArcTan[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 5.06246, size = 8, normalized size = 0.67 \[ b x + \left (a - b\right ) \operatorname{atan}{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x**2+a)/(x**2+1),x)

[Out]

b*x + (a - b)*atan(x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00878993, size = 12, normalized size = 1. \[ (a-b) \tan ^{-1}(x)+b x \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x^2)/(1 + x^2),x]

[Out]

b*x + (a - b)*ArcTan[x]

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 14, normalized size = 1.2 \[ bx+\arctan \left ( x \right ) a-\arctan \left ( x \right ) b \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x^2+a)/(x^2+1),x)

[Out]

b*x+arctan(x)*a-arctan(x)*b

_______________________________________________________________________________________

Maxima [A]  time = 1.49925, size = 16, normalized size = 1.33 \[ b x +{\left (a - b\right )} \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)/(x^2 + 1),x, algorithm="maxima")

[Out]

b*x + (a - b)*arctan(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.229946, size = 16, normalized size = 1.33 \[ b x +{\left (a - b\right )} \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)/(x^2 + 1),x, algorithm="fricas")

[Out]

b*x + (a - b)*arctan(x)

_______________________________________________________________________________________

Sympy [A]  time = 1.24099, size = 26, normalized size = 2.17 \[ b x - \frac{i \left (a - b\right ) \log{\left (x - i \right )}}{2} + \frac{i \left (a - b\right ) \log{\left (x + i \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x**2+a)/(x**2+1),x)

[Out]

b*x - I*(a - b)*log(x - I)/2 + I*(a - b)*log(x + I)/2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.251771, size = 16, normalized size = 1.33 \[ b x +{\left (a - b\right )} \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)/(x^2 + 1),x, algorithm="giac")

[Out]

b*x + (a - b)*arctan(x)